<% @room.players.each_with_index do |p, i| %>
	<% if i <= @room.min_players then %>
		<div class="slot busy">
	<% else %>
		<div class="optional slot">
	<% end %>
		<%=h p.login %>
	</div>
<% end %>

<% (@room.players.length + 1).upto(@room.max_players) do |i| %>
	<% if i <= @room.min_players then %>
		<div class="slot">
	<% else %>
		<div class="optional slot">
	<% end %>
	</div>
<% end %>

<br style="clear:both" />

<p>
  <b>Min players:</b>
  <%=h @room.min_players %>
</p>
<p>
  <b>Max players:</b>
  <%=h @room.max_players %>
</p>

<%= link_to 'Start game', start_game_path %> |
<%= link_to 'Edit', edit_room_path(@room) %> |
<td><%= link_to 'Destroy', @room, :confirm => 'Are you sure?', :method => :delete %></td> |
<%= link_to 'Back', rooms_path %>
